
	<h1>Промени кадар</h1>
	
	<script type="text/javascript" src="<?= base_url('ckeditor/ckeditor.js') ?>"></script>
	
	<?php echo form_open_multipart('adminStaff/updateStaff/'.$id."/".$lang); ?>
	<table>
		<tr>
			<td>Јазик:</td>
			<td><?php if($lang == 'mk') echo 'Македонски';
			else echo 'English'?></td>
		</tr>
		<tr>
			<td>Име</td>
			<td><input type="text" name="name" id="name"
				value="<?= $summ->name?>" /></td>
		</tr>
		<tr>
			<td>Презиме:</td>
			<td><input type="text" name="surname" id="surname"
				value="<?= $summ->surname?>" /></td>
		</tr>
		<tr>
			<td>Титула:</td>
			<td><select id="title" name="title">
					<option value="<?= $summ->title ?>"><?= $summ->title ?></option>
					<?php if($lang == 'mk') 
								echo '<option value="">--</option>\n
									  <option value="дипл. инж.">Дипломиран инженер</option>\n
									  <option value="м-р">Магистер</option>\n
									  <option value="д-р">Доктор</option>\n';
						  else
								echo '<option value="">--</option>\n
									  <option value="B.Sc. Eng.">B.Sc. Eng.</option>\n
									  <option value="M.Sc.">M.Sc.</option>\n
									  <option value="Ph.D.">Ph.D.</option>\n';
					?>
			</select>
			</td>
		</tr>
		<tr>
			<td>Друга титула:</td>
			<td><input type="text" name="title2" id="title2" /></td>
		</tr>
		<tr>
			<td>Телефон:</td>
			<td colspan="2"><input type="text" name="phone" id="phone"
				value="<?= $staff->phone ?>" /></td>
		</tr>
		<tr>
			<td>E-mail:</td>
			<td colspan="2"><input type="text" name="email" id="email"
				value="<?= $staff->email ?>" /></td>
		</tr>
		<tr>
			<td>Позиција:</td>
			<td colspan="2"><select id="position" name="position">
					<?php 
					for ($i=0;$i<=13;$i++){
						if ($staff->position == $i) $selected='selected';
						else $selected = '';
						echo "<option value='".$i."' ".$selected.">".$positions[$i]."</option>";
						};
					?>
			</select></td>
		</tr>
		<?php 
		//Доколку е администратор, смее да се менува улогата за деканат
		$access = explode(',', $this->session->userdata('role'));
		if (in_array('admin', $access)){
		?>
		<tr>
			<td>Деканат:</td>
			<td colspan="2"><select id="dean" name="dean">
					<option value="">--</option>
					<?php 
					for ($i=14;$i<=17;$i++){
						if ($staff->dean == $i) $selected='selected';
						else $selected = '';
						echo "<option value='".$i."' ".$selected.">".$positions[$i]."</option>";
						}
					?>
			</select></td>
		</tr>
		<?php }; ?>
		<tr>
			<td>Приемно време:</td>
			<td><textarea name="officeHours" id="officeHours" cols="40" rows="10"><?= $staff->officeHours ?></textarea></td>
		</tr>	
		<tr>
			<td>Слика:</td>
			<td colspan="2"><input type="file" name="userfile" id="userfile"
				size="20" /></td>
		</tr>
		<tr>
			<td>Резиме:</td>
			<td><textarea class="ckeditor" name="summary" id="summary" cols="40" rows="10"><?= $summ->summary ?></textarea>
			</td>
		</tr>
		<tr>
			<td></td>
			<td colspan="2"><input type="submit" name="submit" id="submit"
				value="Внеси" /></td>
		</tr>
	</table>
	<?php echo form_close(); ?>
